// 类声明接口  使用implement    接口只能约束共有成员
interface Human {
  name: string;
  eat(): void;
}

class Asian implements Human {
  constructor(name: string) {
    this.name = name
  }
  name: string
  eat() { }
  sleep() { }
}

interface Man extends Human {
  run(): void
}

interface Child {
  cry(): void
}

//接口继承接口
interface Boy extends Man, Child { }
let boy: Boy = {
  name: '',
  run() { },
  eat() { },
  cry() { }
}

//接口继承类
class Auto {
  state = 1
  // private state2 = 666
}

interface Autoface extends Auto {

}

class C implements Autoface {
  state = 1

}

class Bus extends Auto implements Autoface {

}


//    extneds                                                       extends
//       ↓                    implements(public)                       ↓
//     interface    <--------------------------------------->        class
//                     extends(public,private,protected)                 

// 接口只能约束类的共有成员
// 接口的继承只能使用类共有，私有，受保护的成员
